/*
 * @Description:屏幕适配
 * @Author: gaoyunpeng
 * @Date: 2022-01-18 21:42:14
 * @LastEditors: gaoyunpeng
 */
const baseSize = 16;
function setRem() {
  const scale = document.documentElement.clientWidth / 1920;
  document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px';
}
// 初始化
setRem();
// 改变窗口大小时重新设置 rem
window.onresize = () => {
  setRem();
};
